<%@ page contentType="text/html; charset=utf-8" language="java" import="java.util.*, cn.edu.ecut.se2024.controller.SysController, cn.edu.ecut.se2024.model.*" %>
 
<% 
UserMenu userMenu = (UserMenu) request.getSession().getAttribute(SysController.SYS_USER_MENU);
List<Resp> resps = userMenu.getResps();
%>
<table>
	<tr>
		<td align="left" valign="top" colspan="2">Hello, <%=userMenu.getUser().getUserName()%></td>
	</tr>
<%
  	String respName;
  	List<JSP> jsps;	
	for(Resp resp: resps) {
		respName = resp.getRespName();
		jsps = resp.getJsps();
%>		
  <tr>
    <td align="left" valign="top" colspan="2"> 
			<%=respName%>
	</td>
  </tr>
<%	
		for (JSP jsp: jsps) {	
			if (jsp.getShowInMenu() == 1) {
%>		
  <tr>
  	<td width="10">&nbsp;</td>
    <td valign="top"> 
			<a href="/<%=jsp.getJspCode()%>" class="left"><%=jsp.getJspName()%></a>
		</td>
  </tr>
<%
			}
		}
	}
%>
</table>